Integrand size = 21, antiderivative size = 107 \[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=-\frac {d x}{b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {d \cos (a+b x) \sin (a+b x)}{b^2}+\frac {2 (c+d x) \sin ^2(a+b x)}{b} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4516, 4489, 2715, 8, 4492, 3800, 2221, 2317, 2438} \[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=-\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {d \sin (a+b x) \cos (a+b x)}{b^2}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 (c+d x) \sin ^2(a+b x)}{b}-\frac {d x}{b}-\frac {i (c+d x)^2}{2 d} \]
[In]
[Out]
Rule 8
Rule 2221
Rule 2317
Rule 2438
Rule 2715
Rule 3800
Rule 4489
Rule 4492
Rule 4516
Rubi steps \begin{align*} \text {integral}& = \int \left (3 (c+d x) \cos (a+b x) \sin (a+b x)-(c+d x) \sin ^2(a+b x) \tan (a+b x)\right ) \, dx \\ & = 3 \int (c+d x) \cos (a+b x) \sin (a+b x) \, dx-\int (c+d x) \sin ^2(a+b x) \tan (a+b x) \, dx \\ & = \frac {3 (c+d x) \sin ^2(a+b x)}{2 b}-\frac {(3 d) \int \sin ^2(a+b x) \, dx}{2 b}+\int (c+d x) \cos (a+b x) \sin (a+b x) \, dx-\int (c+d x) \tan (a+b x) \, dx \\ & = -\frac {i (c+d x)^2}{2 d}+\frac {3 d \cos (a+b x) \sin (a+b x)}{4 b^2}+\frac {2 (c+d x) \sin ^2(a+b x)}{b}+2 i \int \frac {e^{2 i (a+b x)} (c+d x)}{1+e^{2 i (a+b x)}} \, dx-\frac {d \int \sin ^2(a+b x) \, dx}{2 b}-\frac {(3 d) \int 1 \, dx}{4 b} \\ & = -\frac {3 d x}{4 b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {d \cos (a+b x) \sin (a+b x)}{b^2}+\frac {2 (c+d x) \sin ^2(a+b x)}{b}-\frac {d \int 1 \, dx}{4 b}-\frac {d \int \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b} \\ & = -\frac {d x}{b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {d \cos (a+b x) \sin (a+b x)}{b^2}+\frac {2 (c+d x) \sin ^2(a+b x)}{b}+\frac {(i d) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^2} \\ & = -\frac {d x}{b}-\frac {i (c+d x)^2}{2 d}+\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {i d \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {d \cos (a+b x) \sin (a+b x)}{b^2}+\frac {2 (c+d x) \sin ^2(a+b x)}{b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(257\) vs. \(2(107)=214\).
Time = 3.79 (sec) , antiderivative size = 257, normalized size of antiderivative = 2.40 \[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=\frac {c \log (\cos (a+b x))}{b}+\frac {d \csc (a) \left (b^2 e^{-i \arctan (\cot (a))} x^2-\frac {\cot (a) \left (i b x (-\pi -2 \arctan (\cot (a)))-\pi \log \left (1+e^{-2 i b x}\right )-2 (b x-\arctan (\cot (a))) \log \left (1-e^{2 i (b x-\arctan (\cot (a)))}\right )+\pi \log (\cos (b x))-2 \arctan (\cot (a)) \log (\sin (b x-\arctan (\cot (a))))+i \operatorname {PolyLog}\left (2,e^{2 i (b x-\arctan (\cot (a)))}\right )\right )}{\sqrt {1+\cot ^2(a)}}\right ) \sec (a)}{2 b^2 \sqrt {\csc ^2(a) \left (\cos ^2(a)+\sin ^2(a)\right )}}-\frac {d \cos (2 b x) (2 b x \cos (2 a)-\sin (2 a))}{2 b^2}+\frac {d (\cos (2 a)+2 b x \sin (2 a)) \sin (2 b x)}{2 b^2}+\frac {2 c \sin ^2(a+b x)}{b}-\frac {1}{2} d x^2 \tan (a) \]
[In]
[Out]
Time = 2.03 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.65
method | result | size |
risch | \(-\frac {i d \,x^{2}}{2}+i c x -\frac {\left (2 d x b +2 c b +i d \right ) {\mathrm e}^{2 i \left (x b +a \right )}}{4 b^{2}}-\frac {\left (2 d x b +2 c b -i d \right ) {\mathrm e}^{-2 i \left (x b +a \right )}}{4 b^{2}}+\frac {c \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}-\frac {2 c \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}-\frac {2 i d x a}{b}-\frac {i d \,a^{2}}{b^{2}}+\frac {d \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}-\frac {i d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{2}}+\frac {2 d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}\) | \(177\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 340 vs. \(2 (94) = 188\).
Time = 0.28 (sec) , antiderivative size = 340, normalized size of antiderivative = 3.18 \[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=\frac {2 \, b d x - 4 \, {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + 2 \, d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) + {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{2}} \]
[In]
[Out]
\[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=\int \left (c + d x\right ) \sin {\left (3 a + 3 b x \right )} \sec {\left (a + b x \right )}\, dx \]
[In]
[Out]
\[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=\int { {\left (d x + c\right )} \sec \left (b x + a\right ) \sin \left (3 \, b x + 3 \, a\right ) \,d x } \]
[In]
[Out]
\[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=\int { {\left (d x + c\right )} \sec \left (b x + a\right ) \sin \left (3 \, b x + 3 \, a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x) \sec (a+b x) \sin (3 a+3 b x) \, dx=\int \frac {\sin \left (3\,a+3\,b\,x\right )\,\left (c+d\,x\right )}{\cos \left (a+b\,x\right )} \,d x \]
[In]
[Out]